<template>
    <div>
      <el-dialog title="付款信息" :visible.sync="dialogFormVisible" :before-close="closeDialog">
        <el-form >
          <el-col :span="11">
            <el-form-item label="应付金额：" :label-width="formLabelWidth">
            <span>{{payData.paymentMoney}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="11">
            <el-form-item label="收款方名称：" :label-width="formLabelWidth">
            <span>{{payData.name}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="11">
            <el-form-item label="付款方式：" :label-width="formLabelWidth">
              <span>{{payData.withdrawType|changeWithdrawType}}</span>
            </el-form-item>
          </el-col>
          <el-col :span="11">
            <el-form-item label="付款金额：" :label-width="formLabelWidth">
              <span>{{payData.paymentMoney}}</span>
            </el-form-item>
          </el-col>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="closeDialog()">取 消</el-button>
          <el-button type="primary" @click="payment()">确 定</el-button>
        </div>
      </el-dialog>
    </div>
</template>

<script>
  import {  payment } from '@/api/separateAccounts'
  export default {
    name: 'payment',
    props:{
      dialogFormVisible:false,
      payData:Object
    },
    data(){
      return{
        formLabelWidth:"140px"
      }
    },methods:{
      closeDialog(){
        this.$emit('closeDialog')
      },
      payment(){
        payment({id:this.payData.id}).then(res=>{
          if (res.code == 200) {
            this.closeDialog()
            this.$message({
              type: 'success',
              message: '操作成功'
            })
          } else {
            this.$message(res.msg)
          }
        })
      }
    }
  }
</script>

<style scoped>

</style>
